<section class="title">
<?php if ($this->method == 'create'): ?>
	<?php $readonly = '';?>
	<h4><?php echo lang('escort_volume_discount_add_title'); ?></h4>
<?php else: ?>
	<?php $readonly = 'readonly="readonly"';?>
	<h4><?php echo sprintf(lang('escort_volume_discount_edit_title'), $volumeDiscount->agent_username); ?></h4>
<?php endif; ?>
</section>

<section class="item">
	
<?php echo form_open(uri_string(), 'class="crud"'); ?>
<div class="form_inputs" id="news-form">

	<fieldset>
	
		<ul>
			<li class="odd">
				<label for="commercial_id"><?php echo lang('escort_volume_discount_agent_label'); ?></label>
				<div class="input">					
					<?php echo form_dropdown('agent_id',  $agentList, $volumeDiscount->agent_id) ?>
				</div>
			</li>
			<li class="even" id="rate-wrapper">
				<label for="rate"><?php echo lang('escort_volume_discount_rate_label'); ?> <span>*</span></label>
				<div class="input">
				<label><?php echo lang('escort_volume_discount_rate_from_label')?></label>
				<?php echo form_dropdown('rate_from', $rateFromList, $volumeDiscount->rate_from, 'id="rate_from" '); ?>
				<label><?php echo lang('escort_volume_discount_rate_to_label')?></label>
				<?php echo form_dropdown('rate_to', $rateToList, $volumeDiscount->rate_to, 'id="rate_to" '); ?>
				</div>				
			</li>
			<li class="odd">
				<label for="actual_registered"><?php echo lang('escort_volume_discount_actual_label'); ?></label>
				<div class="input">
					<?php echo form_input('actual_registered', $volumeDiscount->actual_registered, 'maxlength"10"')?>
				</div>
			</li>
			<li class="even">
				<label for="active_from"><?php echo lang('escort_volume_discount_active_from_label'); ?></label>
				<div class="input datetime_input">
					<?php echo form_input('active_from', format_date($volumeDiscount->active_from), 'maxlength"10" id="datepicker"')?>
				</div>
			</li>
			<li class="odd">
				<label for="active_to"><?php echo lang('escort_volume_discount_active_to_label'); ?></label>
				<div class="input">
					<?php echo form_input('active_to', format_date($volumeDiscount->active_to), 'maxlength"10" id="datepicker-to"')?>
				</div>
			</li>
			<li class="even">
				<label for="discount_amount_per_register"><?php echo lang('escort_volume_discount_discount_label'); ?></label>
				<div class="input">
					<?php echo form_dropdown('discount_amount_per_register', $discountAmountList, $volumeDiscount->discount_amount_per_register, 'id="discount_amount_per_register" '); ?>
					<?php echo form_dropdown('discount_unit', $discountUnitList, $volumeDiscount->discount_unit, 'id="discount_unit" '); ?>
					<label><?php echo lang('escort_volume_discount_per_register_label')?></label>
				</div>
			</li>
			<li class="even">
				<label for="active"><?php echo lang('escort_volume_discount_active_label'); ?></label>
				<div class="input">
					<?php echo form_checkbox('active',1, $volumeDiscount->active)?>
				</div>
			</li>
		</ul>
	</fieldset>
</div>
<div class="buttons float-right padding-top">
<?php $this->load->view('admin/partials/buttons', array('buttons' => array('save', 'save_exit', 'cancel'))); ?>
</div>
<?php echo form_close(); ?>
</section>